package com.infra.micro.oss.api;

import com.infra.common.resp.Response;
import com.infra.micro.oss.fallback.OssHealthApiFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Date;

@Component
@FeignClient(value = "micro-oss-service", path = "/api/oss/health", fallbackFactory = OssHealthApiFallback.class)
public interface OssHealthApi {
    /**
     * 心跳检查
     *
     * @return
     */
    @RequestMapping(value = "/heartBeat", method = RequestMethod.GET)
    Response<Date> heartBeat();
}
